﻿using System.ComponentModel;
namespace WPFExcelReport
{
    public partial class TSSD0014G :SDBASE
    { 
       
        public TSSD0014G()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VSDDAT();
            DataContext = MV;
            SDSA = "014G"; 
            InitializeComponent(); 
        }
        public override void Window_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            if (IsLoaded)
                return;
            base.Window_Loaded(sender, e); 
            Load();
        }
        public void Load()
        {
            if (SDSA.Trim().Length == 0)
                return;
            dwData = TBMain.NewRow();
            dwData["SDSA"] = "0014";
            dwData["SDKEY"] = " AND SDKEY ='XXXXXX'";
            SResult = ((VSDDAT)MV).QuerySDDAT(dwData, 14);
            MergeData(SResult, false);

            dwData = TBMain.Rows.Add();
            dwData["SDSA"] = "014G";
            dwData["KEY"] = "L";
            dwData["DES"] = "浅";// Helpers.Helper.ConvertGB2312To8859P1("浅");
            dwData = TBMain.Rows.Add();
            dwData["SDSA"] = "014G";
            dwData["KEY"] = "M";
            dwData["DES"] = "中";// Helpers.Helper.ConvertGB2312To8859P1("中"); ;
            dwData = TBMain.Rows.Add();
            dwData["SDSA"] = "014G";
            dwData["KEY"] = "D";
            dwData["DES"] = "深";// Helpers.Helper.ConvertGB2312To8859P1("深"); ;
            dwData = TBMain.Rows.Add();
            dwData["SDSA"] = "014G";
            dwData["KEY"] = "G";
            dwData["DES"] = "原";// Helpers.Helper.ConvertGB2312To8859P1("原");
            dwData = TBMain.Rows.Add();
        } 
    }
}
